//
//  MyViewController.m
//  UI_NavigationCtrollerHomework
//
//  Created by dllo on 16/7/22.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "MyViewController.h"
#import "LoginViewController.h"

@interface MyViewController ()

@end

@implementation MyViewController

- (void)viewDidLoad {
    [super viewDidLoad];
      [self TitleName];
      [self LoginButton];
}

- (void)LoginButton {
      UIButton *button = [[UIButton alloc]initWithFrame:CGRectMake(150, 250, 80, 80)];
      [self.view addSubview:button];
      [button setImage:[UIImage imageNamed:@"Unknown-4"] forState:UIControlStateNormal];
      [button addTarget:self action:@selector(handlebutton:) forControlEvents:UIControlEventTouchUpInside];
      UILabel *label = [[UILabel alloc]initWithFrame:CGRectMake(175, 320, 60, 40)];
      [self.view addSubview:label];
      label.text = @"登录";
      label.textColor = [UIColor colorWithRed:0.255 green:0.671 blue:0.525 alpha:1.000];
}

- (void)handlebutton:(UIButton *)button {
      LoginViewController *login = [[LoginViewController alloc]init];
      [self.navigationController presentViewController:login animated:YES completion:nil];

}

- (void)TitleName {
         self.tabBarItem.image = [[UIImage imageNamed:@"Unknown-3"]imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
      

}
@end
